{include file='public/header'}
<style type="text/css">
	#wrapper {
		width: 100%;
		position: absolute;
		left: 0;
		top:240px;
		overflow: hidden;
		z-index: 1;
		/* 防止本机Windows上的触摸事件 */
		-ms-touch-action: none;
		/* 防止callout tap-hold和文本的选择 */
		-webkit-touch-callout: none;
		-webkit-user-select: none;
		-moz-user-select: none;
		-ms-user-select: none;
		user-select: none;
		/* 防止文本调整取向变化对web应用程序很有用 */
		-webkit-text-size-adjust: none;
		-moz-text-size-adjust: none;
		-ms-text-size-adjust: none;
		-o-text-size-adjust: none;
		text-size-adjust: none;
		height: 300px;
	}
	.pull-loading {
		text-align: center;
		height: 40px;
		line-height: 40px;
		display: flex;
		align-items: center;
		color: #fff;
		justify-content: center;
	}
	#scroller ul li {}
	.w_section3 .w_3{
		padding-top: 0px !important;
	}
	.w_section3 .w_3 .a1 .p2{font-size:14px;}
</style>
<body class="she_body">
<div class="bg_fixed_v10_1"></div>
	<div class="sectionY sectionY_tttt">
		<a href="javascript:history.back();">
			<img src="__PUBLIC__/home/images/v10_a9.png" alt="" class="a1">
		</a>
		<p class="p1">
			<span class="ppp_title">团队奖记录</span>
		</p>
		<a href="{:url('atcChange')}" class="a3">兑换资产</a>
	</div>
	<div class="kong1"></div>
	<div class="w_section1">
		<div class="container2">
			<div class="w_1">
				<div class="f1 clearfix">
					<p class="p1">团队奖</p>

				</div>
				<div class="f2">
					<p class="p1">{$userinfo.wagesall}</p>
				</div>
			</div>
		</div>
	</div>
	<div class="w_section2">
		<div class="container2">
			<div class="w_2">
				<p class="p1">团队奖明细</p>
			</div>
		</div>
	</div>
	<div class="w_section3" id='wrapper'>
		<div class="w_3" id="scroller">
			<ul>
				{foreach $list as $v}
				<li class="clearfix">
					<div class="big clearfix">
					<div class="a1">
						<p class="p1"><span class="s1">
							{if $v.isadd eq 1}+{/if}
							{if $v.isadd eq 2}-{/if}
							{$v.nums}
						</span></p>
						<p class="p2">{$v.info}</p>
					</div>
					<div class="a2">
						<p class="p1">{:date('Y-m-d H:i:s', $v.ctime)}</p>
					</div>
					</div>
				</li>
				{/foreach}
			</ul>
			<div class="pull-loading">上拉加载</div>
		</div>
	</div>
</body>
<script>
	$(function(){
		var dd = $("#wrapper").offset().top;
		$("#wrapper").css("height",($(window).height()-dd-50));
		$("#wrapper").css("top",dd+20);
	})
</script>
<script type="text/javascript">
	var myscroll = new iScroll("wrapper", {
		onScrollMove: function () { //拉动时
			//上拉加载
			if (this.y < this.maxScrollY) {
				$(".pull-loading").html("释放加载");
				$(".pull-loading").addClass("loading");
			} else {
				$(".pull-loading").html("上拉加载");
				$(".pull-loading").removeClass("loading");
			}
		},
		onScrollEnd: function () { //拉动结束时
			//上拉加载
			if ($(".pull-loading").hasClass('loading')) {
				$(".pull-loading").html("加载中...");
				pullOnLoad();
			}
		}
	});
	//上拉加载函数,ajax
	var num = 1;
	function pullOnLoad() {
		num++;
		$.ajax({
			type:'post',
			url:"{:url('User/ajaxmoreatc')}",
			data:{page:num},
			cache:false,
			dataType:'JSON',
			success:function(data){
				//console.log(data);return;
				if(data.length<=0){
					$('.pull-loading').html("已加载全部");
				}else{
					var html = '';
					for(var i=0;i<data.length;i++){
						html += '<li class="clearfix">';
						html += '<div class="big clearfix">';
						html += '   <div class="a1">';
						html += '        				<p class="p1">';
						html += '<span class="s1">';
						if(data[i]['isadd']==1){
							html += '+'+data[i]['nums'];
						}else{
							html += '-'+data[i]['nums'];
						}
						html += ' </span></p>';
						html += '  <p class="p2">'+data[i]['info']+'</p></div>';
						html += '    <div class="a2"><p class="p1">'+data[i]['ctime'];
						html += '    </p> ';
						html += '        		</div>';
						html += '        		</div>';
					}
					$("#scroller ul").append(html);
					$('.pull-loading').html("上拉加载");
				}
				myscroll.refresh();
			}
		});
	}
	pullOnLoad();
</script>
</html>
